package com.chixing.service.impl;

import com.chixing.entity.ReceiveAddress;
import com.chixing.mapper.ReceiveAddressMapper;
import com.chixing.service.IReceiveAddressService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chixing.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author smith
 * @since 2025-09-22
 */
@Service
public class ReceiveAddressServiceImpl implements IReceiveAddressService {

    @Autowired
    private ReceiveAddressMapper receiveAddressMapper;

    @Override
    public Result getById(Integer addressId) {
        ReceiveAddress receiveAddress = receiveAddressMapper.selectById(addressId);
        if (receiveAddress!=null)
            return Result.getSuccess(receiveAddress);
        return Result.getFail(null);
    }
}
